import request from '@/utils/request'

/**
 * 获取广告位列表
 */
export const getAdvPosListApi = data => {
  return request({
    method: 'get',
    url: '/ydd_advpos/list',
    params: data
  })
}

/**
 * 删除广告位
 */
export const delAdvPosApi = id => {
  return request({
    method: 'get',
    url: `/ydd_advpos/del?id=${id}`
  })
}

/**
 * 新增
 */
export const addAdvPosApi = data => {
  return request({
    method: 'post',
    url: '/ydd_advpos/add',
    data
  })
}

/**
 * 获取广告位详情
 */
export const getAdvPosDetailApi = id => {
  return request({
    method: 'get',
    url: `/ydd_advpos/rowInfo?id=${id}`
  })
}

/**
 * 修改
 */
export const editAdvPosApi = data => {
  return request({
    method: 'post',
    url: '/ydd_advpos/update',
    data
  })
}

/**
 * 获取全部广告位
 */
export const getAdvImgAllApi = () => {
  return request({
    method: 'get',
    url: '/ydd_advpos/all'
  })
}
